// Copyright Epic Games, Inc. All Rights Reserved.

#include "class02.h"
#include "Modules/ModuleManager.h"
#include <chrono>
#include <iomanip>
#include <sstream>
#include <iostream>

class MyDefaultGameModule : public FDefaultGameModuleImpl
{
public:
	virtual void StartupModule()
	{
		std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
		std::stringstream ss; ss << std::put_time(std::localtime(&t), "%F %T");
		UE_LOG(LogTemp, Warning, TEXT("Start module at %s"), UTF8_TO_TCHAR(ss.str().c_str()));
	}

	virtual void ShutdownModule()
	{
		std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
		std::stringstream ss; ss << std::put_time(std::localtime(&t), "%F %T");
		UE_LOG(LogTemp, Warning, TEXT("Shutdown module at %s"), UTF8_TO_TCHAR(ss.str().c_str()));
	}
};
IMPLEMENT_PRIMARY_GAME_MODULE(MyDefaultGameModule, class02, "class02");
